package utils;

import java.util.List;

public class PageUtils {
    //分页用到页码值,显示条数,查询结果列表.总条数,总页数

    private Integer pageindex;
    private Integer pagesize=3;
    private List dataList;
    private Integer total;
    private Integer totalPages;

    public Integer getPageindex() {
        return pageindex;
    }

    public void setPageindex(Integer pageindex) {
        this.pageindex = pageindex;
    }

    public Integer getPagesize() {
        return pagesize;
    }

    public void setPagesize(Integer pagesize) {
        this.pagesize = pagesize;
    }

    public List getDataList() {
        return dataList;
    }

    public void setDataList(List dataList) {
        this.dataList = dataList;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public Integer getTotalPages() {
        return total%pagesize>0?total/pagesize+1:total/pagesize;
    }

    public void setTotalPages(Integer totalPages) {
        this.totalPages = totalPages;
    }
}
